import { reqGetSingerList } from '@/api/List'
import { GET_SINGER_LIST } from './singer'
export default {
  namespaced: true,
  state: {
    artistsList: []
  },
  actions: {
    async getSingerList({ commit }) {
      let result = await reqGetSingerList()
      // console.log(result);
      commit('GET_SINGER_LIST', result)
    }
  },
  mutations: {
    [GET_SINGER_LIST](state, result) {
      state.artistsList = result.artists.splice(0, 10)
      // console.log(state.artistsList);
    }
  }
}
